package vue;

import java.awt.Graphics;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;

import javax.imageio.ImageIO;
import javax.swing.JPanel;

public class JPanIndex extends JPanel {

    /**
	 * 
	 */
	private static final long serialVersionUID = -2634379237702948516L;
	private BufferedImage image;

    public JPanIndex() {
       try {      
          image = ImageIO.read(new File("test.jpg"));
       } catch (IOException ex) {
            // handle exception...
       }
    }

    @Override
    public void paintComponent(Graphics g) {
        super.paintComponent(g);
        g.drawImage(image, getWidth()/4, 10, null); // see javadoc for more info on the parameters            
    }

}
